package com.wjh.anyview.quartz.job;

import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.PersistJobDataAfterExecution;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * 任务类
 *
 * @author wjh
 * @date 2021/10/22 1:18
 * @Package com.wjh.anyview.quartz.service
 */
@DisallowConcurrentExecution
@PersistJobDataAfterExecution
@Slf4j
public class JobTest extends QuartzJobBean {

    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
        log.info("quartz是真的666啊！" + context.getJobDetail().getKey().getName());
    }

}
